Skip to content

Extend Cache runtime framework Phase 2: support curvine poc#5762

Merged
cheyang merged 11 commits intofluid-cloudnative:masterfrom
xliuqq:curivne-poc
Apr 16, 2026
Merged

Extend Cache runtime framework Phase 2: support curvine poc#5762
cheyang merged 11 commits intofluid-cloudnative:masterfrom
xliuqq:curivne-poc

Conversation

@xliuqq
Copy link
Copy Markdown
Collaborator

@xliuqq xliuqq commented Apr 5, 2026

Ⅰ. Describe what this PR does

cache runtime support curvine poc.

Ⅱ. Does this pull request fix one issue?

part of #5412

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

e2e test

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

minimal implementation for curvine poc, left runtime/runtimeClass/dataset some fields unprocessed.

@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented Apr 5, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

gemini-code-assist[bot]

This comment was marked as resolved.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 5, 2026

Codecov Report

❌ Patch coverage is 0% with 1113 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.46%. Comparing base (1c1d870) to head (092d8d9).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
pkg/ddc/cache/engine/transform.go 0.00% 147 Missing ⚠️
pkg/ddc/cache/component/statefulset_manager.go 0.00% 134 Missing ⚠️
pkg/ddc/cache/engine/cm.go 0.00% 132 Missing ⚠️
pkg/ddc/cache/component/daemonset_manager.go 0.00% 124 Missing ⚠️
pkg/ddc/cache/engine/transform_client.go 0.00% 63 Missing ⚠️
pkg/ddc/cache/engine/status.go 0.00% 59 Missing ⚠️
pkg/ddc/cache/engine/runtime.go 0.00% 51 Missing ⚠️
pkg/ddc/cache/engine/master.go 0.00% 50 Missing ⚠️
pkg/ddc/cache/engine/sync.go 0.00% 42 Missing ⚠️
pkg/ddc/cache/engine/dataset.go 0.00% 38 Missing ⚠️
... and 13 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5762      +/-   ##
==========================================
- Coverage   60.47%   58.46%   -2.01%     
==========================================
  Files         465      473       +8     
  Lines       31148    32222    +1074     
==========================================
+ Hits        18837    18839       +2     
- Misses      10764    11836    +1072     
  Partials     1547     1547              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: xliuqq <xlzq1992@gmail.com>

support app pod

cv mount succeed

fix mount

todo: use bin/cv mount to filter already mount path

master worker pod starts succeed

set envs

service name should be exposed

Signed-off-by: liuzhiqiang <923463801@qq.com>
Signed-off-by: xliuqq <xlzq1992@gmail.com>
xliuqq added 2 commits April 9, 2026 16:19
Signed-off-by: xliuqq <xlzq1992@gmail.com>
Signed-off-by: xliuqq <xlzq1992@gmail.com>
spec:
template:
spec:
containers:
xliuqq added 2 commits April 9, 2026 19:57
Signed-off-by: xliuqq <xlzq1992@gmail.com>
Signed-off-by: xliuqq <xlzq1992@gmail.com>
@xliuqq xliuqq marked this pull request as ready for review April 9, 2026 12:02
@xliuqq xliuqq changed the title Extend Cache runtime framework Phase 1: support curvine poc Extend Cache runtime framework Phase 2: support curvine poc Apr 10, 2026
xliuqq added 2 commits April 10, 2026 08:52
Signed-off-by: xliuqq <xlzq1992@gmail.com>
Signed-off-by: xliuqq <xlzq1992@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR extends the Cache runtime framework (Phase 2) to support a Curvine PoC, adding new component reconciliation logic (master/worker/client), runtime config generation/mounting, and accompanying GHA e2e manifests/scripts.

Changes:

  • Add Curvine GHA e2e test assets (MinIO, Dataset/CacheRuntime/Class, mount script, read/write jobs).
  • Implement CacheRuntime component reconciliation/status/volume/configmap sync scaffolding for Curvine-style topologies.
  • Extend CacheRuntimeClass API/CRDs with executionEntries (e.g., mountUFS) and generate corresponding OpenAPI.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
test/gha-e2e/curvine/write_job.yaml Adds a write Job to validate writes via the mounted PVC.
test/gha-e2e/curvine/read_job.yaml Adds a read Job to validate data persistence/visibility.
test/gha-e2e/curvine/test.sh Adds an e2e orchestration script for Curvine runtime bring-up and verification.
test/gha-e2e/curvine/mount.yaml Adds a ConfigMap with a mount script used by Curvine master to mount UFS.
test/gha-e2e/curvine/minio.yaml Adds a MinIO Deployment/Service to back the S3 mount used by Curvine.
test/gha-e2e/curvine/minio_create_bucket.yaml Adds a Job to create the required MinIO bucket.
test/gha-e2e/curvine/dataset.yaml Adds a Dataset manifest configured for an S3 mount to MinIO.
test/gha-e2e/curvine/cacheruntime.yaml Adds a CacheRuntime manifest that references the Curvine CacheRuntimeClass.
test/gha-e2e/curvine/cacheruntimeclass.yaml Adds a CacheRuntimeClass defining component topology/templates and execution entries for Curvine.
pkg/utils/runtimes.go Removes GetCacheRuntimeClass helper (migrated to engine method).
pkg/utils/kubeclient/configmap.go Adds ConfigMap creation helper supporting OwnerReferences.
pkg/ddc/efc/runtime_info.go Adds TODO while fetching owner dataset UID from runtime metadata.
pkg/ddc/cache/engine/worker.go Implements worker setup reconciliation and status update logic.
pkg/ddc/cache/engine/volume.go Implements PV/PVC create/delete for cache runtime fuse mount.
pkg/ddc/cache/engine/util.go Adds helpers for naming, runtime config paths, and fuse mount paths.
pkg/ddc/cache/engine/ufs.go Implements UFS mount execution via execution entries in master pod.
pkg/ddc/cache/engine/transform_worker.go Adds worker component transformer from runtime/class to component value.
pkg/ddc/cache/engine/transform_master.go Adds master component transformer from runtime/class to component value.
pkg/ddc/cache/engine/transform_client.go Adds client transformer and fuse HostPath mount injections.
pkg/ddc/cache/engine/transform.go Implements core transform pipeline and common volume/env injection.
pkg/ddc/cache/engine/sync.go Implements runtime config ConfigMap sync during reconcile.
pkg/ddc/cache/engine/status.go Implements master/worker/client status calculations via component helpers.
pkg/ddc/cache/engine/shutdown.go Implements shutdown fuse cleanup via ctrl helper.
pkg/ddc/cache/engine/setup.go Wires runtimeClass retrieval and configmap creation + UFS mount into setup.
pkg/ddc/cache/engine/runtime.go Adds engine-level runtimeClass and runtimeInfo retrieval helpers.
pkg/ddc/cache/engine/master.go Implements master setup reconciliation/status update and master pod info helper.
pkg/ddc/cache/engine/fileutils.go Adds exec/mount helper for running commands in pods with timeout and redaction.
pkg/ddc/cache/engine/engine.go Adds runtimeInfo field to CacheEngine.
pkg/ddc/cache/engine/dataset.go Adds dataset mount option/encrypt option materialization from Secrets.
pkg/ddc/cache/engine/cm.go Implements runtime config ConfigMap generation + class extra configmaps creation.
pkg/ddc/cache/engine/client.go Implements client setup reconciliation and status update logic.
pkg/ddc/cache/component/statefulset_manager.go Adds StatefulSet reconciliation and component status construction.
pkg/ddc/cache/component/daemonset_manager.go Adds DaemonSet reconciliation and component status construction.
pkg/ddc/cache/component/component_manager.go Adds workload-type dispatcher and common label helpers for components.
pkg/ddc/base/runtime.go Updates CacheRuntime handling in runtime info building and adds TODOs.
pkg/common/label.go Adds cache runtime label/annotation constants.
pkg/common/constants.go Adds DefaultNameSpace constant.
pkg/common/cacheruntime.go Adds cache runtime component/config structs for generated runtime config.
config/crd/bases/data.fluid.io_cacheruntimeclasses.yaml Extends CRD schema with executionEntries.
charts/fluid/fluid/crds/data.fluid.io_cacheruntimeclasses.yaml Mirrors CRD schema changes for Helm chart packaging.
api/v1alpha1/openapi_generated.go Adds OpenAPI schemas for ExecutionEntries / ExecutionCommonEntry.
api/v1alpha1/cacheruntimeclass_types.go Adds ExecutionEntries types to API.
Comments suppressed due to low confidence (5)

test/gha-e2e/curvine/mount.yaml:1

  • The second validation checks $mountPoint again but the message says it's validating path. This makes the script fail to detect an empty path. Change the second condition to check $path.
    test/gha-e2e/curvine/test.sh:1
  • .status.succeeded / .status.failed can be empty before the controller sets them. Using -ne/-eq on an empty string will cause bash: integer expression expected and potentially break the test loop. Normalize empties to 0 (e.g., parameter expansion defaults) before numeric comparisons.
    test/gha-e2e/curvine/minio.yaml:1
  • Using hostPort: 9000 can cause scheduling failures or port conflicts in multi-node/shared CI clusters (and is generally discouraged for in-cluster services). Prefer ClusterIP-only access (remove hostPort) or constrain scheduling explicitly if hostPort is truly required.
    test/gha-e2e/curvine/write_job.yaml:1
  • mkdir /data/foo will fail if the directory already exists (e.g., reruns or partial cleanup), which can make the e2e test flaky. Use an idempotent directory creation (e.g., mkdir -p).
    test/gha-e2e/curvine/minio_create_bucket.yaml:1
  • mc mb myminio/test fails if the bucket already exists, which can make retries/reruns flaky. Consider using the MinIO client option to ignore existing buckets (or check existence before creation).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/ddc/cache/engine/cm.go
Comment thread pkg/ddc/cache/engine/worker.go Outdated
Comment thread pkg/ddc/cache/engine/status.go
Comment thread pkg/ddc/cache/engine/transform.go Outdated
Comment thread pkg/ddc/cache/engine/transform_client.go
Comment thread pkg/ddc/cache/engine/client.go Outdated
Comment thread pkg/common/constants.go Outdated
Comment thread api/v1alpha1/cacheruntimeclass_types.go Outdated
Comment thread pkg/ddc/cache/engine/cm.go
Comment thread pkg/ddc/cache/engine/worker.go
xliuqq added 2 commits April 15, 2026 17:04
Signed-off-by: xliuqq <xlzq1992@gmail.com>
Signed-off-by: xliuqq <xlzq1992@gmail.com>
Signed-off-by: xliuqq <xlzq1992@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented Apr 16, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cheyang cheyang merged commit fff7cb5 into fluid-cloudnative:master Apr 16, 2026
16 of 18 checks passed
@xliuqq xliuqq deleted the curivne-poc branch April 17, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants